<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<title>权限收回原因</title>
	<%@ include file="/common/meta.jsp"%>
</head>

<body>
	<form method="post" id="mainForm">
		<input type="hidden" name="orgCode" id="orgCode" value="${param.orgCode}" />
		<input type="hidden" name="psnCode" id="psnCode" value="${param.psnCode}" />
		<textarea id="opinion" name="opinion" cols="60" rows="10" maxlength="500"></textarea>
      	<br/>
		<div style="text-align: center;">
		
		      	&nbsp;<input type="button" class="button_01" value="收回权限" id="submit"/>
	
			
	      	&nbsp;<input type="button" class="button_01" value="返回" id="back"/>
		</div>
	</form>

<script type="text/javascript">
var prcWin = new progressWin("${res}");//初始化遮罩层
$(function(){
	$("#submit").click(function(){
		if($("#opinion").val() == ""){
			var megTitle = $("#submit").val();
			scmWarn("请输入"+megTitle+"的相关内容或原因",null,2000);
		}else{
			var options = {
					beforeSubmit : function() {
						$("#submit").attr("disabled",true);
						prcWin.openWin();//打开遮罩层
					}, // 表单提交前的回调函数
					success : function(msg) {
						if(msg == "noapprove"){
							prcWin.closeWin();
							scmWarn("该代理机构目前有正在代理的技术合同登记，不能取消权限，如需取消请与系统管理员联系！");
						}else{
							scmSuccess(msg);
							prcWin.closeWin();
							parent.irisGrid.getGridDom().jqGrid("refresh",0);//0是本页1是首页
							window.setTimeout("parent.tb_remove()", 2000);
						}
					},// 表单成功提交后的回调函数
					error : function() {
						scmError("操作失败,请联系系统管理员");
						prcWin.closeWin();
					},
					url: "${ctx}/tech-ctr/deprive",
					type : "post", // 提交方式 post,get
					timeout:30000 
				}  ;
			$("#mainForm").ajaxSubmit(options);
		}
	});
	$("#back").click(function(){
		parent.irisGrid.getGridDom().jqGrid("refresh",0);//0是本页1是首页
		parent.tb_remove();
	});
	
});
</script>
</body>
</html>